#include <DataFrame/DataFrame.h>
#include <fmt/core.h>
#include <rapidcsv.h>

using UIDataFrame = hmdf::StdDataFrame<unsigned int>;

int main()
{
    const char* p_str_csv_file_path = "data/Iris.csv";
    rapidcsv::Document data_content(p_str_csv_file_path);

    std::vector<unsigned int> idx = data_content.GetColumn<unsigned int>("Id");
    std::vector<float> sepal_length_col =
        data_content.GetColumn<float>("SepalLengthCm");
    std::vector<float> sepal_width_col =
        data_content.GetColumn<float>("SepalWidthCm");
    std::vector<float> petal_length_col =
        data_content.GetColumn<float>("PetalLengthCm");
    std::vector<float> petal_width_col =
        data_content.GetColumn<float>("PetalWidthCm");
    std::vector<std::string> species_col =
        data_content.GetColumn<std::string>("Species");

    UIDataFrame data_frame;
    data_frame.load_data(std::move(idx),
                         std::make_pair("SepalLengthCm", sepal_length_col),
                         std::make_pair("SepalWidthCm", sepal_width_col),
                         std::make_pair("PetalLengthCm", petal_length_col),
                         std::make_pair("PetalWidthCm", petal_width_col),
                         std::make_pair("Species", species_col));
    fmt::print("idx size: {}\n", idx.size());
    fmt::print("speal length size: {}\n", sepal_length_col.size());
    return 0;
}
